import Layout from '../components/Layout.vue'

let routes = [
    {
        path: '/Login',
        meta: {
            title: '登录',
            hidden: true,
        },
        component: () => import('../views/Login.vue')
    },
    {
        path: '/Register',
        meta: {
            title: '注册',
            hidden: true,
        },
        component: () => import('../views/Register.vue')
    },
    {
        path: '/ArticleDetails',
        meta: {
            title: '文章详情',
            icon:'el-icon-circle-plus-outline',
        },
        component:()=>import('../views/ArticleDetails.vue')

    },


    {
        path: '/',
        meta: {
            title: '首页',
            icon: 'el-icon-notebook-1',
            hidden: true,
        },
        //重定向
        redirect: { path: '/UserManagement' },

        component: Layout,
        children: [
            {
                //用户管理
                path: 'UserManagement',
                meta: {
                    title: '用户管理',
                    icon: 'el-icon-user',
                },
                component: () => import('../views/Users.vue')
            },
        ]

    },
    {
        path: '/AdministratorManagement',
        meta: {
            title: '管理员管理',
            icon: 'el-icon-edit',
            hidden:true,
        },
        component: Layout,
        children:[
            {
                path: 'Administrator',
                meta: {
                    title: '管理员',
                    icon: 'el-icon-edit-outline',
                },
                component: () => import('../views/Administrator.vue')
            }
        ]
    },

    {
        //文章管理
        path: '/ArticleManagement',
        meta: {
            title: '文章管理',
            icon: 'el-icon-notebook-1',
        },
        component: Layout,
        children: [{
            path: 'ArticleType',
            meta: {
                title: '文章类型',
                icon:'el-icon-document-remove',
            },
            component:()=>import('../views/ArticleType.vue')
        },
        {
            path: 'Article',
            meta: {
                title: '文章',
                icon:'el-icon-document',
            },
            component:()=>import('../views/Article.vue'),
            children: [
                {
                    path: 'ArticlePublished',
                    meta: {
                        title: '文章已发布',
                        icon:'el-icon-circle-check',
                    },
                    component:()=>import('../views/ArticlePublished.vue')
                },
                {
                    path: 'ArticleNotPublished',
                    meta: {
                        title: '文章未发布',
                        icon:'el-icon-circle-close',
                    },
                    component:()=>import('../views/ArticleNotPublished.vue')
                },
            ]
        }
        ]

    },
    //轮播图管理
    {
        path: '/CarouselMapManagement',
        meta: {
            title: '轮播图管理',
            icon: 'el-icon-c-scale-to-original',
            hidden:true
        },
        component: Layout,
        children: [{
            path: 'RotationChart',
            meta: {
                title: '轮播图',
                icon: 'el-icon-view',
            },
            component: () => import('../views/RotationChart.vue')
        },
        ]
    },
    //二维码管理
    {
        path: '/QRCodeManagement',
        meta: {
            title: '二维码管理',
            icon: 'el-icon-no-smoking',
        },
        component: Layout,
        children: [
            {
                path: 'QRCodeType',
                meta: {
                    title: '二维码类型',
                    icon: 'el-icon-news',
                },
                component:()=>import('../views/QRCodeType.vue')
            },
            {
            path: 'QRCode',
            meta: {
                title: '二维码',
                icon: 'el-icon-smoking',
            },
            component: () => import('../views/QRCode.vue')
        },
        ]
    },
    //公安备案信息管理
    {
        path: '/FilingInformationManagement',
        meta: {
            title: '公安备案信息管理',
            icon: 'el-icon-postcard',
            hidden:true
        },
        component: Layout,
        children: [{
            path: 'FilingInformation',
            meta: {
                title: '公安备案信息',
                icon: 'el-icon-message',
            },
            component: () => import('../views/FilingInformation.vue')
        },
        ]
    }
]

export default routes